package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 数据库备份对象 sys_database_backup
 * 
 * @author ruoyi
 */
public class DatabaseBackup extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 备份ID */
    private Long backupId;

    /** 数据库ID */
    @Excel(name = "数据库ID")
    private Long dbId;

    /** 数据库名称 */
    @Excel(name = "数据库名称")
    private String dbName;
    
    /** 备份文件名 */
    @Excel(name = "备份文件名")
    private String fileName;

    /** 备份文件路径 */
    @Excel(name = "备份文件路径")
    private String filePath;
    
    /** 备份文件大小 */
    @Excel(name = "备份文件大小")
    private Long fileSize;
    
    /** 备份位置（0本地 1远程服务器） */
    @Excel(name = "备份位置", readConverterExp = "0=本地,1=远程服务器")
    private String backupLocation;
    
    /** 备份方式（0命令行 1JDBC） */
    @Excel(name = "备份方式", readConverterExp = "0=命令行,1=JDBC")
    private String backupMethod;
    
    /** 远程服务器ID */
    private Long remoteServerId;
    
    /** 远程服务器名称 */
    @Excel(name = "远程服务器名称")
    private String remoteServerName;
    
    /** 备份时间 */
    @Excel(name = "备份时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private String backupTime;

    public void setBackupId(Long backupId) 
    {
        this.backupId = backupId;
    }

    public Long getBackupId() 
    {
        return backupId;
    }
    
    public void setDbId(Long dbId) 
    {
        this.dbId = dbId;
    }

    public Long getDbId() 
    {
        return dbId;
    }
    
    public void setDbName(String dbName) 
    {
        this.dbName = dbName;
    }

    public String getDbName() 
    {
        return dbName;
    }
    
    public void setFileName(String fileName) 
    {
        this.fileName = fileName;
    }

    public String getFileName() 
    {
        return fileName;
    }
    
    public void setFilePath(String filePath) 
    {
        this.filePath = filePath;
    }

    public String getFilePath() 
    {
        return filePath;
    }
    
    public void setFileSize(Long fileSize) 
    {
        this.fileSize = fileSize;
    }

    public Long getFileSize() 
    {
        return fileSize;
    }
    
    public void setBackupLocation(String backupLocation) 
    {
        this.backupLocation = backupLocation;
    }

    public String getBackupLocation() 
    {
        return backupLocation;
    }
    
    public void setBackupMethod(String backupMethod) 
    {
        this.backupMethod = backupMethod;
    }

    public String getBackupMethod() 
    {
        return backupMethod;
    }
    
    public void setRemoteServerId(Long remoteServerId) 
    {
        this.remoteServerId = remoteServerId;
    }

    public Long getRemoteServerId() 
    {
        return remoteServerId;
    }
    
    public void setRemoteServerName(String remoteServerName) 
    {
        this.remoteServerName = remoteServerName;
    }

    public String getRemoteServerName() 
    {
        return remoteServerName;
    }
    
    public void setBackupTime(String backupTime) 
    {
        this.backupTime = backupTime;
    }

    public String getBackupTime() 
    {
        return backupTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("backupId", getBackupId())
            .append("dbId", getDbId())
            .append("dbName", getDbName())
            .append("fileName", getFileName())
            .append("filePath", getFilePath())
            .append("fileSize", getFileSize())
            .append("backupLocation", getBackupLocation())
            .append("backupMethod", getBackupMethod())
            .append("remoteServerId", getRemoteServerId())
            .append("remoteServerName", getRemoteServerName())
            .append("backupTime", getBackupTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
} 